package cn.itcast.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
public class MyProceedingJoinPoint {

    private Object target;
    private Method method;
    private Object[] args;


    public Object proceed() throws InvocationTargetException, IllegalAccessException {
        return method.invoke(target, args);


    }

    public Object proceed(Object[] args) throws InvocationTargetException, IllegalAccessException {
        return method.invoke(target, args);
    }
}
